home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Genie / Projects / AEA / Source / Sources / Object Models / AEAModel.cc next >
Encoding:
C/C++ Source or Header  |  2000-06-24  |  1.9 KB  |  100 lines

  1. /*    =============
  2.  *    AEAModel.cpp
  3.  *    =============
  4.  */
  5.  
  6. #include "AEADebugging.h"
  7.  
  8. #include <AEBuild.h>
  9.  
  10. #include "AEAModel.hh"
  11. #include "AEATokenModel.hh"
  12. #include "AEADesc.hh"
  13.  
  14. void
  15. AEAModel::GetKeyData(DescType inKeyForm, AEDesc &outAEDesc) const
  16. {
  17.     outAEDesc.descriptorType = typeNull;
  18.     outAEDesc.dataHandle = NULL;
  19. }
  20.  
  21. void
  22. AEAModel::MakeToken(AEATokenModel *&outToken)
  23. {
  24.     outToken = new AEATokenModel(this);
  25. }
  26.  
  27. void
  28. AEAModel::MakeObjSpecifier(AEDesc &outAEDesc) const
  29. {
  30.     OSErr err;
  31.     AEDesc containerSpec;
  32.     DescType keyForm;
  33.     AEADesc keyData;
  34.     
  35.     keyForm = PreferredKeyForm();
  36.     GetKeyData(keyForm, keyData.Ref());
  37.     
  38.     GetContainerObjSpec(containerSpec);
  39.     
  40.     err = ::AEBuild(&outAEDesc, 
  41.         "obj{want:type(@), form:enum(@), seld:@, from:@}", 
  42.         Class(), 
  43.         keyForm, 
  44.         &keyData.Ref(), 
  45.         &containerSpec);
  46.     ThrowIfOSErr_(err);
  47. }
  48.  
  49. long
  50. AEAModel::CountElements(DescType inDesiredClass) const
  51. {
  52.     ThrowOSErr_(errAEEventNotHandled);
  53.     return 0; // happy compiler fix
  54. }
  55.  
  56. void
  57. AEAModel::GetElementByIndex(DescType inDesiredClass, long inIndex, AEAModel *&outObject) const
  58. {
  59.     ThrowOSErr_(errAEEventNotHandled);
  60. }
  61.  
  62. void
  63. AEAModel::GetElementByName(DescType inDesiredClass, const AEADesc &inName, AEAModel *&outObject) const
  64. {
  65.     ThrowOSErr_(errAEEventNotHandled);
  66. }
  67.  
  68. void
  69. AEAModel::GetElementByID(DescType inDesiredClass, long inID, AEAModel *&outObject) const
  70. {
  71.     ThrowOSErr_(errAEEventNotHandled);
  72. }
  73.  
  74. void
  75. AEAModel::GetProperty(DescType inDesiredClass, DescType inPropertyID, AEAModel *&outObject) const
  76. {
  77.     ThrowOSErr_(errAEEventNotHandled);
  78. }
  79.  
  80. AEAModel *
  81. AEAModel::GetProperty(DescType inDesiredClass, DescType inPropertyID) const
  82. {
  83.     AEAModel *model;
  84.     GetProperty(inDesiredClass, inPropertyID, model);
  85.     return model;
  86. }
  87.  
  88. void
  89. AEAModel::MakeElement(DescType inNewClass /*, at*/ /*, with properties*/)
  90. {
  91.     ThrowOSErr_(errAEEventNotHandled);
  92. }
  93.  
  94. // FIXME:  Get rid of this!
  95. void
  96. AEAModel::RespondToEvent(const AEADescAppleEvent *inAppleEvent, AEADescAppleEvent *outReply)
  97. {
  98.     ThrowOSErr_(errAEEventNotHandled);
  99. }
  100.